package com.zjitc.config;

import com.zjitc.obj.Teacher;
import com.zjitc.obj.User;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/3/13 14:28
 * @description:
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations ={"classpath:spring-configuration1.xml"})
public class XmlConfiguration {
    @Autowired
    private User user;

    @Test
    public void testgetUser(){
      Assert.assertNotNull(user.getTeacher());
    }
}
